<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 3.求以下二维数组的平均值，最大值，最小值（考点：二维数组遍历）
        let arr = [[12, 43, 23, 123], [54, 54, 23, 64], [86, 67, 34, 23]];
        let arr1 = arr.flat()
        let sum = 0
        arr1.forEach(function (v) {
            sum += v / arr1.length

        })
        console.log(sum);

        arr1.sort(function (a, b) {
            return a - b
        })
        console.log(arr1);
        let min = arr1[0]
        let max = arr1[arr1.length - 1]
        console.log(min, max);

    </script>
</body>

</html>